/*    */ package com.zimbra.cs.service.mail;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.common.soap.MailConstants;
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import com.zimbra.cs.service.util.ItemId;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class PurgeRevision
/*    */   extends MailDocumentHandler
/*    */ {
/* 30 */   private static final String[] TARGET_PATH = { "revision", "id" };
/* 31 */   protected String[] getProxiedIdPath(Element request) { return TARGET_PATH; }
/*    */   
/*    */   public Element handle(Element request, Map<String, Object> context) throws ServiceException {
/* 34 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 35 */     Element revisionElem = request.getElement("revision");
/* 36 */     ItemId iid = new ItemId(revisionElem.getAttribute("id"), zsc);
/* 37 */     int rev = (int)revisionElem.getAttributeLong("ver");
/* 38 */     boolean includeOlderRevisions = revisionElem.getAttributeBool("includeOlderRevisions", false);
/* 39 */     Mailbox mbox = getRequestedMailbox(zsc);
/* 40 */     mbox.purgeRevision(getOperationContext(zsc, context), iid.getId(), rev, includeOlderRevisions);
/*    */     
/* 42 */     return zsc.createElement(MailConstants.PURGE_REVISION_RESPONSE);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/mail/PurgeRevision.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */